"""
获取目前工程内（month01）所有的.py文件代码的字符数量
"""
from pathlib import Path

total_count = 0
for item in Path.cwd().parent.rglob("*.py"):
    print(item)
    with open(item,"r",encoding="UTF-8") as file:
        for item in file.readlines():
            total_count += len(item.strip())
print(total_count)

list01 = ["哈哈","嘻嘻","咯咯咯"]
num = 0
for item in list01:
    # print(len(item))
    num += len(item)
print(num)

print("====================")
list02 = [len(item) for item in list01]
print(list02)
print(sum(list02))
print(sum(len(item) for item in list01))
